package com.s4j.struts.biz.model;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * 重症肌无力-治疗史调查-中药
 *
 */
@Entity
@Table(name="BIZ_MG_TREATHISCM")
public class MgTreathisCm {

	private Long cmId;
	
	private String name;	//中药
	
	private String sDate;	//用药开始时间
	
	private String eDate;	//用药结束时间
	
	private BizMgTreathis treathis;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Long getCmId() {
		return cmId;
	}

	public void setCmId(Long cmId) {
		this.cmId = cmId;
	}

	@Column(length=50, nullable=false)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(length=20)
	public String getsDate() {
		return sDate;
	}

	public void setsDate(String sDate) {
		this.sDate = sDate;
	}

	@Column(length=20)
	public String geteDate() {
		return eDate;
	}

	public void seteDate(String eDate) {
		this.eDate = eDate;
	}

	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="treathisId")
	public BizMgTreathis getTreathis() {
		return treathis;
	}

	public void setTreathis(BizMgTreathis treathis) {
		this.treathis = treathis;
	}
}
